package factory;

import classes.DocumentFilterComER;

public class DocumentFilterFactory {
   public static final int SO_NUMEROS = 0;
   public static final int SO_LETRAS = 1;

   public static DocumentFilterComER criar(int tipo){
      switch (tipo) {
      case SO_NUMEROS:
         return new DocumentFilterComER("[^0-9]");
      case SO_LETRAS:
         return new DocumentFilterComER("[^A-Z|^a-z]");
      default:
         return new DocumentFilterComER("");
      }
   }
   public static DocumentFilterComER criar(String er){
      return new DocumentFilterComER(er);
   }
}

